package com.system.manager.common.enums.fileType;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import java.io.File;

/**
 * @Classname TxtFile
 * @Description TODO 文本类文件
 * @Date 2021/11/12 10:47
 * @Created by 杨小鹏：【241960695@qq.com】
 */
@NoArgsConstructor
@AllArgsConstructor
public enum TxtFile implements FileType{

    ALL(".MD.txt"),
    MD(".MD"),

    TXT(".txt");

    public String txtFormat;

    @Override
    public String getFileType() {
        return "txt";
    }

    @Override
    public String getFileFormat() {
        return txtFormat;
    }

    @Override
    public boolean isValid(String fileSuffixName) {
        return ALL.getFileFormat().contains(fileSuffixName);
    }

    @Override
    public boolean equals(String fileSuffixName) {
        return this.getFileFormat().equals(fileSuffixName);
//        return false;
    }

    @Override
    public boolean isNetworkSecurity(File file) {
        return false;
    }


    @Override
    public void operation(File file) {

    }
}
